/**
 * https://pintia.cn/problem-sets/994805046380707840/exam/problems/type/7?problemSetProblemId=994805138600869888
 */

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int n,i,t,sum,j,g=0;
    int a[2000];
    cin>>n;
    for(i=2;i<=sqrt(n)+1;i++){
        if(n%i==0)
            a[g++]=i;
    }if(g==0){
        cout<<"1"<<endl<<n<<endl;
        return 0;
    }
    int p=0,max=1;
    for(i=0;i<g;i++){
        sum=a[i];
        t=1;
        for(j=i+1;j<g;j++){
            if(a[j]-a[j-1]==1){
                sum*=a[j];
                if(n%sum==0)
                    t++;
                else
                    break;
            }else
                break;
        }if(t>max){
            max=t;
            p=i;
        }
    }
    cout<<max<<endl<<a[p];
    for(i=p+1;i<p+max;i++)
        cout<<"*"<<a[i];
    cout<<endl;
    return 0;
}